
package com.oahc.magicdefender.util;

import com.badlogic.gdx.Gdx;

public class MDConfig {
    public final static float ARROW_SPEED = 25;// 每次走的距离

    public final static float ARROW_SLOT_INIT_X = -50f;

    public final static float ARROW_SLOT_INIT_Y = 260f;

    public final static float START_BUTTON_X = 660f;

    public final static float START_BUTTON_Y = 175f;

    public static final int IMG_WIDTH = 800;

    public static final int IMG_HEIGHT = 480;

    public static float exchangeX(float originalX) {
        return originalX / IMG_WIDTH * Gdx.graphics.getWidth();
    }

    public static float exchangeY(float originalY) {
        return originalY / IMG_WIDTH * Gdx.graphics.getHeight();
    }

    /**
     * x缩放比例 当前屏幕宽/默认宽800
     * 
     * @return
     */
    public static float getXScale() {
        return Gdx.graphics.getWidth() / IMG_WIDTH;
    }

    public static float getYScale() {
        return Gdx.graphics.getHeight() / IMG_HEIGHT;
    }

}
